package com.lyn.mvp.view.activity

import android.os.Bundle
import android.view.View
import com.lyn.mvp.databinding.ActivityMainBinding
import com.lyn.mvp.model.Result

class MainActivity : BaseActivity<ActivityMainBinding>() {

    override fun getViewBinding(): ActivityMainBinding {
        return ActivityMainBinding.inflate(layoutInflater)
    }

    override fun create(savedInstanceState: Bundle?) {

    }

    fun login(view: View) {
        val name=binding.name.text.toString()
        val password=binding.password.text.toString()
        presenter.login(name,password)

    }

    override fun onChanged(result: Result) {
        result.msg?.let { toast(it) }
    }




}